import {Component, OnInit} from "@angular/core";
import {Award} from "../svrs/domain";
import {ActivatedRoute} from "@angular/router";
import {AwardService} from "../svrs/award.service";

@Component({
  selector: 'zm-increase',
  templateUrl: './increase.component.html',
  styleUrls: ['./increase.component.css']
})
export class IncreaseComponent implements OnInit{
  award:Award[];
  ccc;
  constructor(private svr:AwardService,private aRouter:ActivatedRoute) {
    aRouter.params.subscribe(pars => {
      if (pars && pars.awardID) {
        this.ccc = parseInt(pars.awardID)-1;
      }
    })
    this.svr.getAwards().subscribe(
      (data) => {
        this.award = data;
      }
    )
  }
  ngOnInit(){
}
}

